<style scoped src="./index.scss" lang="scss" rel="stylesheet/scss"></style>
<template src="./index.html"></template>
<script>
export default {
    mixins: [Vue.prototype.$vFN.Mixins.Base, Vue.prototype.$vFN.Mixins.Edit],
    components: {
        
    },
    data() {
        return {
            appWindow: window,
            form: {
                level_id: "",

            },

            levelList: [],
        };
    },
    methods: {
        // 队长列表
        async getLevel() {
            let res = await this.$vFN.Http.post({
                url: "plugin/team-dividend/admin/level/list",
            }, window); 

            this.levelList = res.data.list;
        },

        // 设置队长
        async setLevel() {
            let res = await this.$vFN.Http.post({
                url: "plugin/team-dividend/admin/member/editDealer",
                data: {
                    level_id: this.form.level_id,
                    member_id: this.member_id,
                }
            }, window); 
            if(res.code == 200) {
                this.onSuccess();
                this.mixinEdit_editVisible = false;
                this.$vFN.Tools.messageSuccess("修改成功")
            }
        },
        // 初始化
        async init() {
            this.form.level_id = this.levelId
            this.getLevel();
            // 显示窗口
            this.mixinEdit_editVisible = true;
        },
        onSuccess(){

        },

    },
    mounted() {
        this.init();
    },
    activated() {},
};
</script>